Skip to content

Feat/decay rate#13

Merged
alexkeating merged 2 commits into
mainfrom
feat/decay-rate
Aug 18, 2025
Merged

Feat/decay rate#13
alexkeating merged 2 commits into
mainfrom
feat/decay-rate

Conversation

@thelostone-mc

@thelostone-mc thelostone-mc commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

@thelostone-mc
thelostone-mc force-pushed the feat/decay-rate branch 8 times, most recently from 776de71 to 302630a Compare August 4, 2025 07:13
@alexkeating
alexkeating marked this pull request as ready for review August 14, 2025 18:14
Comment thread src/QueryTypeStakingPool.sol
Comment thread src/QueryTypeStakingPool.sol Outdated
Comment thread test/QueryTypeStakingPool.t.sol Outdated
Comment thread test/QueryTypeStakingPool.t.sol Outdated
@thelostone-mc
thelostone-mc force-pushed the feat/decay-rate branch 4 times, most recently from c65808c to 83be3c2 Compare August 18, 2025 06:10
Comment thread test/QueryTypeStakingPool.t.sol Outdated
uint256 expectedLoss = 250 ether; // 25% of 1000 ether
assertEq(balanceAfter - balanceBefore, expectedLoss, "50% decay rate should lose 25% of stake");

// Test case 2: 100% decay rate (complete loss)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split each case into a separate test

Comment thread test/QueryTypeStakingPool.t.sol Outdated
assertGe(finalAmount, 0, "Amount should not go negative");
}

function test_DecayRateExamples() public {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a more descriptive name test_FiftyPercentDecayRateAfterHalfofTheStakePeriod

@github-actions

Copy link
Copy Markdown

Coverage after merging feat/decay-rate into main will be

100.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   QueryTypeStakerFactory.sol100%100%100%100%
   QueryTypeStakingPool.sol100%100%100%100%

@alexkeating
alexkeating merged commit 2a00a69 into main Aug 18, 2025
4 checks passed
@thelostone-mc
thelostone-mc deleted the feat/decay-rate branch August 18, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants